package com.zhouyu.postprocessors;

import com.zhouyu.service.OrderService;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: Shen Xiaoqiang
 * @create: 2023/10/12 17:35
 * @Version 1.0.0
 * 所属公司: 重庆云网股份科技有限公司
 **/
@Component
public class MyBeanPostProcessors implements BeanPostProcessor {

	@Autowired
	private OrderService orderService;

	@Override
	public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
		System.out.println("MyBeanPostProcessors postProcessBeforeInitialization ...");
		return BeanPostProcessor.super.postProcessBeforeInitialization(bean, beanName);
	}

	@Override
	public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
		System.out.println("MyBeanPostProcessors postProcessAfterInitialization ...");
		return BeanPostProcessor.super.postProcessAfterInitialization(bean, beanName);
	}
}
